package com.ztgf.order.models.service.pay;

import com.ztgf.order.models.bo.pay.PayOrderSaveBO;
import com.ztgf.order.models.dto.*;
import com.ztgf.order.models.vo.pay.PayOrderVO;
import com.ztgf.shopping.models.dto.shop.ShopEarnestMoneyDTO;

import java.math.BigDecimal;

/**
 * 支付日志表服务
 *
 * @author mxli
 * @Date 2021-06-03 16:12:28
 */
public interface IPayOrderService {


    /**
     * 支付  除了佣金、申请平台砍价服务费、年费支付不冻结 ，其余所有金额都冻结
     * @param bo
     * @param payOrderVO
     * @param shopId
     * @param userId
     * @param userName
     */
    void savePayOrderInfo(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long shopId, Long userId, String userName);

    /**
     * 申请平台砍价服务费
     * @param bo
     * @param payOrderVO
     * @param shopId
     * @param userId
     * @param userName
     */
    void savePayPurchaseBargain(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long shopId, Long userId, String userName);


    /**
     * 砍价服务费支付
     * @param bo
     * @param payOrderVO
     * @param shopId
     * @param userId
     * @param userName
     */
    void savePayPurchaseFeeMoneyScalePrice(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long shopId, Long userId, String userName);

    /**
     * 年费
     * @param bo
     * @param userId
     * @param userName
     */
    void savePayAnnualFee(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long userId, String userName);

    /**
     * 扣除保证金
     * @param bo
     * @param payOrderVO
     * @param userId
     * @param userName
     */
    void saveDeductMargin(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long userId, String userName);

    /**
     * 支付保证金
     * @param bo
     * @param payOrderVO
     * @param shopId
     * @param userId
     * @param userName
     */
    void savePayMargin(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long shopId, Long userId, String userName);

    /**
     * 取消订单砍价手续费退款
     * @param bo
     * @param orderInfoDTO
     * @param payOrderVO
     * @param userId
     * @param userName
     */
    void saveCancelRefundPurchaseFeeMoneyScalePrice(PayOrderSaveBO bo, OrderInfoDTO orderInfoDTO, PayOrderVO payOrderVO, Long userId, String userName);

    /**
     * 取消订单退款
     * @param bo
     * @param orderInfoDTO
     * @param payOrderVO
     * @param userId
     * @param userName
     */
    void saveCancelRefundMoney(PayOrderSaveBO bo, OrderInfoDTO orderInfoDTO, PayOrderVO payOrderVO, Long userId, String userName);

    /**
     * 取消订单退款
     * @param bo
     * @param orderInfoDTO
     * @param payOrderVO
     * @param userId
     * @param userName
     * @param orderPayRelationDTO
     * @param trsFlag
     */
    void savePayCancelRefundMoney(PayOrderSaveBO bo, OrderInfoDTO orderInfoDTO, PayOrderVO payOrderVO, Long userId, String userName, OrderPayRelationDTO orderPayRelationDTO, String trsFlag);

    /**
     * 售后订单退款
     * @param bo
     * @param payOrderVO
     * @param orderReturnCommodityDTO
     * @param userId
     * @param userName
     */
    void saveRefundMoney(PayOrderSaveBO bo, PayOrderVO payOrderVO, OrderReturnCommodityDTO orderReturnCommodityDTO, Long userId, String userName, String orderNO);


    /**
     * 售后订单退款
     * @param bo
     * @param payOrderVO
     * @param refundDTO
     * @param userId
     * @param userName
     */
    void saveRefundMoney(PayOrderSaveBO bo, PayOrderVO payOrderVO, OrderReturnCommodityRefundDTO refundDTO, Long userId, String userName, String orderNO);


    /**
     * 解冻保证金
     * @param moneyDTO
     * @param shopId
     * @param money
     * @param userId
     * @param userName
     * @param notes
     */
    void saveUnfreezeMarginMoney(ShopEarnestMoneyDTO moneyDTO, Long shopId, BigDecimal money, Long userId, String userName, String notes);


    /**
     * 售后订单退款砍价手续费
     * @param bo
     * @param orderReturnCommodityDTO
     * @param payOrderVO
     * @param userId
     * @param userName
     */
    void saveRefundPurchaseFeeMoney(PayOrderSaveBO bo, OrderReturnCommodityDTO orderReturnCommodityDTO, PayOrderVO payOrderVO, Long userId, String userName);

    /**
     * 解冻订单金额
     * @param orderInfoDTO
     * @param orderPayRelationDTO
     * @param money
     * @param userId
     * @param userName
     */
    void saveUnfreezeMoney(OrderInfoDTO orderInfoDTO, OrderPayRelationDTO orderPayRelationDTO, BigDecimal money, Long userId, String userName);

    /**
     * 佣金支付
     * @param bo
     * @param userId
     * @param userName
     */
    void savePayCommissionMoney(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long userId, String userName);

//    /**
//     * 签收解冻砍价手续费
//     * @param orderInfoDTO
//     * @param orderStatusDTO
//     * @param userId
//     * @param userName
//     */
//    void saveUnfreezePurchaseFeeMoney(OrderInfoDTO orderInfoDTO, OrderStatusDTO orderStatusDTO, Long userId, String userName);


    /**
     * 售后/取消订单 退款佣金
     * @param bo
     * @param userId
     * @param userName
     */
    void saveRefundCommissionMoney(PayOrderSaveBO bo, PayOrderVO payOrderVO, Long userId, String userName);
}
